﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <title> 河南工业大学设计研究院-文档管理系统</title> 
    <link href="/CSS/bootstrap3.3.5/css/bootstrap.css" rel="stylesheet" type="text/css" />
    <link href="/CSS/V3/animate.css" rel="stylesheet">
    <link href="/CSS/V3/style.css?v=2.2.0" rel="stylesheet">
    <link href="CSS/font-awesome-4.3.0/css/font-awesome.min.css" rel="stylesheet" />
    <link href="/CSS/V3/BaseClassV3.css" rel="stylesheet">

    <style>
        .iconfont {
            font-size: 14px;
        }
    </style>
</head>
<body ms-controller="IndexV3" class="fixed-sidebar full-height-layout ">
    <div id="wrapper" style="overflow:hidden">
        <nav class="navbar-default navbar-static-side" role="navigation">
            <div class="sidebar-collapse">
                <ul class="nav" id="side-menu">
                    <li class="nav-header" style="text-align: center; background-color: transparent; padding-bottom:15px;padding-top: 15px; ">
                        <div class="dropdown profile-element">
                            <span>
                                <img alt="" style="width:60px;height:60px" class="img-circle" onerror="javascript: this.src = '/images/TX/default.png'" ms-attr-src="'/Upload/TX/'+UserData.UserName+'.jpg'">

                            </span>
                            <a data-toggle="dropdown" class="dropdown-toggle" href="index.html#">
                                <span class="clear">
                                    <span class="block m-t-xs">
                                        <strong class="font-bold">{{UserData.UserRealName}}</strong>
                                    </span> <span class="text-muted text-xs block">{{ model.BranchName}} <b class="caret"></b></span>
                                </span>
                            </a>
                            <ul class="dropdown-menu animated fadeInRight m-t-xs">
                                <li>
                                    <a href="javascript:void(0)" ms-click="UploadHeadImage()">修改头像</a>
                                </li>
                                <li>
                                    <a href="#" data-toggle="modal" data-target="#UpdateNameModal">修改密码</a>
                                </li>
                                <li id="xtset" ms-if="roleCode.indexOf('2')>-1">
                                    <a href="/Admin/indexAdmin.html">系统管理</a>
                                </li>
                                <li class="divider"></li>
                                <li ms-click="exit()">
                                    <a href="#">安全退出</a>
                                </li>
                            </ul>
                        </div> 
                    </li> 
                    <li class="active menu">
                        <a href="/VIEWV3/APPBaseView/QYWD/APP_QYWD.html" target="main"><i class="iconfont icon-wangpan"></i><span class="nav-label">企业资料库</span></a>
                    </li>
                    <li class="menu">
                        <a href="/VIEWV3/APPBaseView/QYWD/APP_QYWD_GR.html" target="main"><i class="iconfont icon-ren"></i><span class="nav-label">个人文档</span></a>
                    </li>
                    <li class="menu" style="display:none">
                        <a href="/VIEWV3/APPBaseView/QYWD/APP_QYWD_GX.html" target="main"><i class="iconfont icon-ren"></i><span class="nav-label">共享资料库</span></a>
                    </li>
                    <li class="menu">
                        <a href="/VIEWV3/APPBaseView/QYWD/APP_QYWD_SC.html" target="main"><i class="iconfont icon-ren"></i><span class="nav-label">我的收藏</span></a>
                    </li> 
                    <li class="menu">
                        <a href="/VIEWV3/APPBaseView/QYWD/APP_MyDownLoad.html" target="main"><i class="iconfont icon-ren"></i><span class="nav-label">我的下载</span></a>
                    </li> 
                </ul>
            </div>
        </nav>
        <div id="page-wrapper" class="gray-bg dashbard-1">
            <div class="row border-bottom">
                <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                    <div class="navbar-header">
                        <a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i class="iconfont icon-fenlei"></i> </a>
                        <h3 class="text-success" id="comName" style=" FLOAT: RIGHT; MARGIN-TOP: 20PX;display:none ">
                         河南工业大学设计研究院-文档管理系统
                        </h3>
                        <img src="images/Log/SZHL.png" style="height:50px;FLOAT: RIGHT;margin-top:5px;" id="logimg" onerror="javascript: document.getElementById('logimg').style.display = 'none'; document.getElementById('comName').style.display = '';" />
                    </div>
                    <ul class="nav navbar-top-links navbar-right"> 
                        <li ms-click="refiframe()">
                            <a>
                                <i class="iconfont icon-shuaxin"></i> 刷新
                            </a>
                        </li> 
                        <li>
                            <a href="#" ms-click="exit()">
                                <i class=" fa fa-sign-out">
                                </i> 退出
                            </a>
                        </li>
                    </ul>
                </nav>
            </div>
            <div class="row J_mainContent" id="content-main">
                <iframe class="J_iframe" id="main" name="main" width="100%" height="100%" frameborder="0" seamless></iframe>
                <script>

                    function SetFrameHeight(framename) {

                        var oFrm = document.getElementById(framename);
                        oFrm.onload = oFrm.onreadystatechange = function () {
                            if (this.readyState && this.readyState != 'complete') return;
                            else {
                                var mainheight = $("body").height() - 80;
                                $("#" + framename).height(mainheight);
                                $(window.frames[framename].document).find(".contentdv").css({ height: mainheight + "px", overflow: "auto" });
                            }
                        }
                    }
                </script>
            </div>
            <div class="row">
                <div class="footer fixed">
                    <div class="pull-right">
                        By：<a href="http://www.qijieyun.com" target="_blank">神州科技</a>
                    </div>
                    <div>
                        <a href="#"> 河南工业大学设计研究院-文档管理系统</a>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="modal fade" id="UpdateNameModal" role="dialog">
        <div class="modal-dialog" role="document" style="width: 500px">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">修改密码</h4>
                </div>
                <div class="modal-body">
                    <div class="form-horizontal">
                        <div class="form-group">
                            <label class="col-xs-4 control-label"><span class="Required">*</span>新密码</label>
                            <input type="password" class="form-control szhl_require" style="width: 200px" id="newPwd" placeholder="请输入新密码" />
                        </div>
                        <div class="form-group">
                            <label class="col-xs-4 control-label"><span class="Required">*</span>确认密码</label>
                            <input type="password" class="form-control szhl_require" style="width: 200px" id="newPwd2" placeholder="请输入确认密码" />
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-success" id="conaddForder" ms-click="ModifyPwd(this)"><i class="fa fa-spinner fa-spin" style="display: none"></i>确&nbsp;&nbsp;认</button>
                </div>
            </div>
        </div>
    </div>
    <!-- Mainly scripts -->
    <script src="/Scripts/jquery-1.11.2.min.js"></script>
    <script src="/CSS/bootstrap3.3.5/js/bootstrap.js"></script>
    <script src="/JqueryPlug/V3/jquery.metisMenu.js"></script>
    <script src="/JqueryPlug/V3/jquery.slimscroll.min.js"></script>
    <!-- Custom and plugin javascript -->
    <script src="/JqueryPlug/V3/hplus.js?v=2.2.0"></script>
    <script type="text/javascript" src="/JqueryPlug/layer2/layer/layer.js"></script>
    <script src="/JqueryPlug/V3/pace.min.js"></script>
    <script src="/Scripts/SZHLCommon.js?jsver=5"></script>
    <script src="/Scripts/avalon.min.js"></script>
    <script>
        $(function () {
            SetFrameHeight('main')

            $("#content-main").height($("body").height() - 70)
            $("#main").height($("body").height());
            $(".menu").click(function () {
                $(".menu").removeClass("active")
                $(this).addClass("active")
            })
            $("#side-menu a").each(function () {

                var url = $(this).attr("href");
                if (url.indexOf("?") > 0) {
                    url += "&v=" + Math.random();
                } else {
                    url += "?v=" + Math.random();
                }
                $(this).attr("href", url);
            })

            $("#main").attr("src", "/VIEWV3/APPBaseView/QYWD/APP_QYWD.html")
        })
        var model = avalon.define({
            $id: "IndexV3",
            KJMenu: localStorage.getItem("widgemenutdata") ? $.parseJSON(localStorage.getItem("widgemenutdata")) : [{ code: "GZRZ", title: "添加工作报告", issel: true, ico: "1" }, { code: "RCTX", title: "添加待办任务", issel: true, ico: "2" }, { code: "TXSX", title: "添加日程提醒", issel: true, ico: "4" }, { code: "JHAP", title: "添加计划安排", issel: true, ico: "5" }, { code: "XMGL", title: "添加项目", issel: false, ico: "6" }, { code: "KHGL", title: "添加客户", issel: false, ico: "7" }, { code: "NOTE", title: "添加记事本", issel: true, ico: "8" }, { code: "TXL", title: "添加联系人", issel: false, ico: "8" }, { code: "DXGL", title: "添加短信发送", issel: false, ico: "8" }],//{ code: "xjlxr", title: "客户联系记录", issel: false, ico: "9" }
            ChangeWidget: function (item, event) {
                if (event) {
                    event.stopPropagation();
                }
                if (item.issel) {
                    item.issel = false;
                } else {
                    item.issel = true;
                }
                localStorage.setItem("widgemenutdata", JSON.stringify(model.KJMenu.$model))
                model.refiframe();
            },
            CommonData: [],//消息中心
            UserData: {},//用户信息
            CompanyName: "",
            BranchName: "",
            
            exit: function () {
                if (!ComFunJS.getCookie("password")) {
                    ComFunJS.delCookie('username');
                }
                ComFunJS.delCookie('szhlcode');

                location.href = "loginV3.html"
            },
            refiframe: function () {
                //刷新当前页面
                var piframe = $("iframe")[0];
                piframe.contentWindow.location.reload()
            }, 
            roleCode: "",
            //用户信息
            GetUserData: function () {
                $.getJSON('/API/SZHLAPI.ashx?Action=GETUSERBYUSERNAME', { P1: ComFunJS.getnowuser() }, function (resultData) {
                    if (resultData.ErrorMsg == "") {
                        model.UserData = resultData.Result;
                        model.BranchName = resultData.Result1;
                        model.roleCode = resultData.Result2;
                    }
                })
            }, 
            //上传头像
            UploadHeadImage: function () {
                ComFunJS.winviewform("/View/Common/UploadTX.html", "头像上传", "700", "570");
            },

            //修改密码
            ModifyPwd: function (dom) {
                var pwd = $("#newPwd").val();
                var pwd2 = $("#newPwd2").val();
                var retmsg = "";
                if ($("#UpdateNameModal .szhl_require")) {
                    $("#UpdateNameModal .szhl_require").each(function () {
                        if ($(this).val() == "") {
                            retmsg = $(this).parent().find("label").text() + "不能为空";
                        }
                    })
                }
                if (retmsg !== "") {
                    layer.tips(retmsg, dom);
                    return;
                }
                if (pwd != pwd2) {
                    retmsg = "确认密码不一致";
                    layer.tips(retmsg, dom);
                    return;
                }
                $.post("/API/SZHLAPI.ashx?Action=MODIFYPWD", { P1: pwd, P2: pwd2 }, function (result) {
                    var jsonresult = $.parseJSON(result)
                    $(dom).removeClass("disabled").find("i").hide();
                    if ($.trim(jsonresult.ErrorMsg) != "") {
                        ComFunJS.winwarning(jsonresult.ErrorMsg);
                    } else {
                        ComFunJS.winsuccess("操作成功");
                        $('#UpdateNameModal').modal('hide');
                    }
                });
                $("#newPwd").val("");
                $("#newPwd1").val("");
            },
            OpenCreateForm: function (ProName) {
                ComFunJS.winviewform("/View/APPBaseView/APP_ADD_WF.html?FormCode=" + ProName, "添加数据", "1000", "");
            }
        })
        avalon.ready(function () {
            ComFunJS.initsetajax(); 
            model.GetUserData(); 
            if (!ComFunJS.isPC()) {
                $("#logimg").hide()
            }
        })
    </script>
</body>
</html>